-
Notifications
You must be signed in to change notification settings - Fork 1.9k
PLEX-2149 fix add capabilities CLD to prevent removal of existing cabilities in the DON #20530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLEX-2149 fix add capabilities CLD to prevent removal of existing cabilities in the DON #20530
Conversation
…abilities in the DON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements capability configuration merging to prevent accidental removal of existing capabilities when adding new ones to a DON (Decentralized Oracle Network). The core change introduces a merge mechanism that preserves existing capabilities on-chain when new capabilities are added.
- Adds a
MergeCapabilityConfigsWithOnChainflag to control whether new capabilities should be merged with existing ones - Refactors capability configuration logic to use a map-based approach with deduplication
- Extends test coverage to verify that adding multiple capabilities sequentially preserves all configurations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
deployment/cre/capabilities_registry/v2/changeset/sequences/add_capabilities.go |
Sets merge flag to true when updating DON capabilities |
deployment/cre/capabilities_registry/v2/changeset/operations/contracts/update_don.go |
Implements capability merging logic with map-based deduplication and sorting |
deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go |
Adds test to verify sequential capability additions preserve existing configurations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go
Outdated
Show resolved
Hide resolved
…ties_test.go Co-authored-by: Copilot <[email protected]>
|
…ilities in the DON (#20530) * PLEX-2149 fix add capabilities CLD to prevent removal of existing capabilities in the DON * Update deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> (cherry picked from commit 1e6d72f)




No description provided.